<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div data-th-replace="common/functionDepict"></div>
    <div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <section>
                            <input id ="overallAdvertInfoId"  type="hidden" th:value="${overallAdvert}!=null?${overallAdvert['id']}:''">
                            <section class="clearfix pt10" style="height: 50px;">
                                <aside class="pull-left">
                                    <span class="fs14 c-000 vam">|</span>
                                    <span class="fs16 c-000 vam ml5">设置PC端头尾广告位</span>
                                </aside>
                                <aside class="pull-right">
                                    <span class="ml10 fs12 c-999">此广告位为PC端网校全局公共头部或尾部位置，显示位置比较显著，适用于活动推广、网校宣传、重大通知等。</span>
                                </aside>
                            </section>
                            <div>
                                <section class="form-horizontal">
                                    <div class="form-group pt10 clearfix" style="height: 40px;">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 显示广告位</label>
                                        <div class="col-sm-9">
                                            <div class="checkbox i-checks">
                                                <label><input name="isShow" type="radio" th:checked="(${overallAdvert}==null or ${overallAdvert['attributeMap']['isShow']} eq '1' or ${overallAdvert['attributeMap']['isShow']} eq '')" value="1"> 显示</label>
                                                <label><input name="isShow" type="radio" th:checked="(${overallAdvert}==null or ${overallAdvert['attributeMap']['isShow']} eq '2')" value="2">隐藏</label>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="showDetail" th:classappend="(${overallAdvert}!=null and ${overallAdvert['attributeMap']['isShow']} eq '2')?'hide':''">
                                        <div class="form-group pt10">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 显示位置</label>
                                            <div class="col-sm-9">
                                                <div class="checkbox i-checks">
                                                    <label>
                                                        <input name="showLocationTop" type="checkbox" th:checked="(${overallAdvert}==null or ${overallAdvert['attributeMap']['showLocationTop']} eq '1')" value="1">
                                                        公共头部
                                                    </label>
                                                    <label>
                                                        <input name="showLocationTail" type="checkbox" th:checked="(${overallAdvert}==null or ${overallAdvert['attributeMap']['showLocationTail']} eq '1')" value="1">
                                                        公共尾部
                                                    </label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group pt10" id="showLocationTop"  th:classappend="(${overallAdvert}!=null and ${overallAdvert['attributeMap']['showLocationTop']} eq '0')?'hide':''" >
                                            <label class="col-sm-2 control-label text-right">头部设置</label>
                                            <div class="col-sm-9">
                                                <div class="m-l-md">
                                                    <section class="clearfix m-t-sm">
                                                        <p>
                                                            <button class="btn btn-primary btn-outline" id="logoImgByTopButton" type="button">选择广告图片</button>
                                                            <span class="ml10">
                                            <small class="fs14 c-999">
                                                <i class="fa fa-lightbulb-o"></i> 建议尺寸：2000px * 84px；最大高限制：120px；jpg、jpeg、png格式，图片小于1M
                                            </small>
                                        </span>
                                                        </p>
                                                        <div th:if="${overallAdvert}!=null and ${overallAdvert['attributeMap']['logoImgByTop']} != ''">
                                                            <img class="img-thumbnail logoImg logoImgByTop" id="logoImgByTop" style="width: 100%;max-width: 1200px;max-height: 120px;" th:src="${overallAdvert['attributeMap']['logoImgByTop']}" >
                                                        </div>
                                                        <div th:if="${overallAdvert}!=null and ${overallAdvert['attributeMap']['logoImgByTop']} == ''">
                                                            <img class="img-thumbnail logoImg logoImgByTop" id="logoImgByTop" style="width: 100%;max-width: 1200px;max-height: 120px;" src='https://static.268xue.com/admin/v3/img/default/default-pic.jpg?v=1591064507791' >
                                                        </div>
                                                    </section>
                                                    <section class="m-t-lg">
                                                        <div>
                                                            <strong class="text-right fs12"><i class="c-red">*</i> 设置链接地址</strong>
                                                        </div>
                                                        <section class="clearfix mt10">
                                                            <aside class="pull-left" style="width: 15%">
                                                                <select class="form-control" name="chainedTypeByTop" id="chainedTypeByTop">
                                                                    <option value="">— 请选择 —</option>
                                                                    <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTop']}==0" value="0">不设置链接</option>
                                                                    <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTop']}==1" value="1">设置链接</option>
                                                                    <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTop']}==2" value="2">三方客服</option>
                                                                </select>
                                                            </aside>
                                                            <aside class="pull-left" style="width: 85%" th:classappend="(${overallAdvert}!=null and ${overallAdvert['attributeMap']['chainedTypeByTop']} eq '0')?'hide':''" id="chainedByTop">
                                                                <input type="text" name="chainedByTop" placeholder="链接目标地址" class="form-control" th:value="${overallAdvert['attributeMap']['chainedByTop']}">
                                                            </aside>
                                                        </section>
                                                    </section>
                                                    <section class="m-t-lg">
                                                        <div>
                                                            <strong class="text-right fs12"><i class="c-red">*</i> 是否可关闭</strong>
                                                        </div>
                                                        <section class="checkbox i-checks">
                                                            <label>
                                                                <input name="isClosableByTop" type="radio"  th:checked="(${overallAdvert}==null or  ${overallAdvert['attributeMap']['isClosableByTop']} eq '1' or ${overallAdvert['attributeMap']['isClosableByTop']} eq '')" value="1">是</label>
                                                            <label>
                                                                <input name="isClosableByTop" type="radio" th:checked="(${overallAdvert}==null or  ${overallAdvert['attributeMap']['isClosableByTop']} eq '2')" value="2">否</label>
                                                            <span class="m-l-lg">
                                            <small class="fs12 c-999">默认为是，支持广告位在前端可关闭，即展示的广告位上有可关闭的操作按钮</small>
                                        </span>
                                                        </section>
                                                    </section>
                                                </div>
                                            </div>
                                        </div>
                                        <!--公共尾部 设置开始-->
                                        <div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label text-right">&nbsp;</label>
                                                <div class="col-sm-9">
                                                    <hr>
                                                </div>
                                            </div>
                                            <div class="form-group" id="showLocationTail" th:classappend="(${overallAdvert}!=null and ${overallAdvert['attributeMap']['showLocationTail']} eq '0')?'hide':''" >
                                                <label class="col-sm-2 control-label text-right">尾部设置</label>
                                                <div class="col-sm-9">
                                                    <div class="m-l-md">
                                                        <section class="clearfix m-t-sm">
                                                            <p>
                                                                <button class="btn btn-primary btn-outline"
                                                                        id="logoImgByTailButton" type="button">选择广告图片
                                                                </button>
                                                                <span class="ml10">
                                                                    <small class="fs14 c-999">
                                                                        <i class="fa fa-lightbulb-o"></i> 建议尺寸：2000px * 84px；最大高限制：120px；jpg、jpeg、png格式，图片小于1M
                                                                    </small></span>
                                                            </p>
                                                            <div th:if="${overallAdvert}!=null and ${overallAdvert['attributeMap']['logoImgByTail']} != ''">
                                                                <img class="img-thumbnail logoImg logoImgByTail" id="logoImgByTail" style="width: 100%;max-width: 1200px;max-height: 120px;" th:src="${overallAdvert['attributeMap']['logoImgByTail']}" >
                                                            </div>
                                                            <div th:if="${overallAdvert}!=null and ${overallAdvert['attributeMap']['logoImgByTail']} == ''">
                                                                <img class="img-thumbnail logoImg logoImgByTail" id="logoImgByTail" style="width: 100%;max-width: 1200px;max-height: 120px;" src='https://static.268xue.com/admin/v3/img/default/default-pic.jpg?v=1591064507791' >
                                                            </div>
                                                        </section>
                                                        <section class="m-t-lg">
                                                            <div>
                                                                <strong class="text-right fs12"><i class="c-red">*</i> 设置链接地址</strong>
                                                            </div>
                                                            <section class="clearfix mt10">
                                                                <aside class="pull-left" style="width: 15%">
                                                                    <select class="form-control" name="chainedTypeByTop" id="chainedTypeByTail">
                                                                        <option value="">— 请选择 —</option>
                                                                        <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTail']}==0" value="0">不设置链接</option>
                                                                        <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTail']}==1" value="1">内部链接</option>
                                                                        <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTail']}==2" value="2">外部链接</option>
                                                                        <option th:selected="${overallAdvert['attributeMap']['chainedTypeByTail']}==3" value="3">三方客服</option>
                                                                    </select>
                                                                </aside>
                                                                <aside class="pull-left" style="width: 85%" th:classappend="(${overallAdvert}!=null and ${overallAdvert['attributeMap']['chainedTypeByTail']} eq '0')?'hide':''" id="chainedByTail">
                                                                    <input type="text" name="chainedByTail" placeholder="链接目标地址" class="form-control" th:value="${overallAdvert['attributeMap']['chainedByTail']}">
                                                                </aside>
                                                            </section>
                                                        </section>
                                                        <section class="m-t-lg">
                                                            <div>
                                                                <strong class="text-right fs12"><i class="c-red">*</i> 是否可关闭</strong>
                                                            </div>
                                                            <section class="checkbox i-checks">
                                                                <label>
                                                                    <input name="isClosableByTail" type="radio" th:checked="(${overallAdvert}==null or  ${overallAdvert['attributeMap']['isClosableByTail']} eq '1' or ${overallAdvert['attributeMap']['isClosableByTail']} eq '')" value="1">
                                                                    是
                                                                </label>
                                                                <label>
                                                                    <input name="isClosableByTail" type="radio" th:checked="(${overallAdvert}==null or  ${overallAdvert['attributeMap']['isClosableByTail']} eq '2')"value="2">
                                                                    否
                                                                </label>
                                                                <span class="m-l-lg">
                                                <small class="fs12 c-999">默认为是，支持广告位在前端可关闭，即展示的广告位上有可关闭的操作按钮</small>
                                            </span>
                                                            </section>
                                                        </section>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--公共尾部 设置 结束-->
                                    <div class="form-group pt10">
                                        <hr>
                                        <label class="col-sm-2 control-label text-right">&nbsp;</label>
                                        <div class="col-sm-9">
                                            <div class="m-t-lg m-b-lg m-l-md">
                                                <button class="btn btn-w-m btn-danger" id="saveOverallAdvert" type="button"> 保存</button>
                                            </div>
                                        </div>
                                    </div>
                                </section>
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<!--引入脚本-->
<script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
<script th:src="@{{path}/admin/business/planTools/overallAdvert/overallAdvertInfo.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>